import request from '@/utils/request'

// 查询发货单列表
export function listDelivery(query) {
  return request({
    url: '/purchase/delivery/list',
    method: 'get',
    params: query
  })
}
// 查询发货单列表
export function listDeliveryVO(query) {
  return request({
    url: '/purchase/delivery/listVO',
    method: 'get',
    params: query
  })
}
// 查询发货单详细
export function getDelivery(id) {
  return request({
    url: '/purchase/delivery/' + id,
    method: 'get'
  })
}
// 查询发货单详细
export function getDeliveryVO(id) {
  return request({
    url: '/purchase/delivery/' + id,
    method: 'get'
  })
}
// 新增发货单
export function addDelivery(data) {
  return request({
    url: '/purchase/delivery',
    method: 'post',
    data: data
  })
}

// 修改发货单
export function updateDelivery(data) {
  return request({
    url: '/purchase/delivery',
    method: 'put',
    data: data
  })
}

// 删除发货单
export function delDelivery(id) {
  return request({
    url: '/purchase/delivery/' + id,
    method: 'delete'
  })
}

// 确认发货
export function confirmDelivery(id) {
  return request({
    url: '/purchase/delivery/confirm/' + id,
    method: 'put'
  })
}

